import {autoAddDictionary} from '~/plugins/Tools/autoStore';
const dictionary = { arriveCityLeave: [] };

export const state = () => ({
  moneySum: 0,
  moneyUse: 0,
  moneyUse2: 0,
  ...autoAddDictionary('state', dictionary),
});

/**
 * GROUP/SET
 *
 */

export const mutations = {
  SET_moneySum: function (state, payload) {
    state.moneySum = payload;
  },
  SET_moneyUse: function (state, payload) {
    state.moneyUse = payload;
  },
  SET_moneyUse2: function (state, payload) {
    state.moneyUse2 = payload;
  },
  DEL_money: function (state, payload) {
    state.moneySum = 0;
    state.moneyUse = 0;
    state.moneyUse2 = 0;
  },
  ...autoAddDictionary('mutations', dictionary),
};
